]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Show window resizing clone on "size-changed"
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 28 Feb 2020 15:43:48 +0000 (16:43 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 28 Feb 2020 18:08:24 +0000 (18:08 +0000)
When a window is being resized by the compositor, with Wayland the
compositor first asks the window to change its size and emits the
"size-change" signal, and then emits the "size-changed" signal after
the window acknowledges the new size. To show a fancy resize animation,
gnome-shell creates a "screenshot" of the resizing window on the
"size-change" signal, and later animates that "screenshot" to the new
window size on the "size-changed" signal.

Now if a client is not responding to our requests asking it to change
its size, we get a "size-change" signal and start showing the
window-clone, but never a "size-changed" signal, animating and hiding
the clone again. This causes a so called "ghost window" that is shown
above everything else and never disappears again.

To fix that, start showing the window clone once we get the
"size-changed" signal instead of the "size-change" signal. This makes
sure the window actually updates its size and the clone is going to be
hidden again.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/1078

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1055

js/ui/windowManager.js

index 075fbb15bb44ff4e9da0dc44ce87687fdb805461..53f1845615f504d7cbe883dc3b16eafc20a50ecd 100644 (file)
@@ -1259,7 +1259,6 @@ var WindowManager = class {
         actorClone.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
         actorClone.set_position(oldFrameRect.x, oldFrameRect.y);
         actorClone.set_size(oldFrameRect.width, oldFrameRect.height);
-        Main.uiGroup.add_actor(actorClone);
 
         if (this._clearAnimationInfo(actor))
             this._shellwm.completed_size_change(actor);
@@ -1290,6 +1289,8 @@ var WindowManager = class {
         this._resizePending.delete(actor);
         this._resizing.add(actor);
 
+        Main.uiGroup.add_child(actorClone);
+
         // Now scale and fade out the clone
         actorClone.ease({
             x: targetRect.x,